class Chess{
	board=new Board();
	view="red";
	pieces=[];
	selects=[];
	mays=[];
	
	show=function(){
		this.board.init(this.view);
		this.board.pieces(this.pieces,this.view);
		this.board.selects(this.selects,this.view);
		this.board.mays(this.mays,this.view);
	};
	
	flip=function(){
		if(this.view=="black"){
			this.view="red";
		}else{
			this.view="black";
		}
		this.init();
	};
}